<template>
    <div id="mygetter">
        <h3>MapGetter</h3>
        <p>getters:{{$store.getters.filterInfo}}</p>
        <p>mapGetters:{{info}}</p>
        <p>获取长度:{{getInfoLength}}</p>
    </div>
</template>
<script>
    import {mapGetters} from 'vuex'

    export default {
        data(){
            return{

            }
        },
        computed:{
            //对象展开符 解构mapGetters
            ...mapGetters({
                //将store中的getters的filterInfo 
                //映射到组件上的info计算属性上
                info:"filterInfo"
            }),
            ...mapGetters([//字符串数组
                "getInfoLength"
            ])
        }
    }
</script>

<style>
    #mygetter{
        border: 1px solid pink;margin-top: 10px;
    }
</style>